package shape;

/**
 * Created by thoughtworks on 25/7/14.
 */
public class Diamond extends Shape{
    private int height;

    public Diamond(int height) {
        this.height = height;
    }

    @Override
    public String[] exportString() {
        String[] bitmap,temp;
        int totalHeight = height * 2 - 1;
        temp = new IsoscelesTriangle(height).exportString();
        bitmap = new String[totalHeight];
        int i;
        for(i = 0;i < height;i++)
        {
            bitmap[i] = temp[i];
            bitmap[totalHeight - i - 1] = temp[i];
        }
        return bitmap;
    }
}
